import service from '@/utils/request'

const baseUrl = "/sys/user";

export function getUserApiUrl(){
    return {
        list:   baseUrl+'/page',	//分页查询API地址
        add:    baseUrl+'/add',		//添加API地址
        edit:   baseUrl+'/edit',	//修改API地址
        delete: baseUrl+'/delete',	//删除API地址
    };
}

export function resetPasswordApi(data){
    return service.post(baseUrl+"/passwd", data)
}

export function setRoleApi(data){
    return service.post(baseUrl+"/setrole", data)
}

export function getUserRoleApi(user_id){
    return service.get(baseUrl+"/getroles?id="+user_id)
}

export function setUserRoleApi(data){
    return service.post(baseUrl+"/setroles", data)
}